<template>
  <div id="app">
    <h2>我是父组件</h2>
    <p>来自子组件的数据:{{message}}</p>
    <Son1 :datas="num" @sendMsg="getDataFromSon"></Son1>
    <Son2></Son2>
  </div>
</template>

<script>
import Son1 from '@/components/Son1.vue'
import Son2 from '@/components/Son2.vue'
export default {
  name: 'App',
  data(){
    return{
      num:4396,
      message:null
    }
  },
  components: {
    Son1,
    Son2
  },
  methods:{
    getDataFromSon(val){
      this.message = val
    }
  }
}
</script>

<style>

</style>
